import request from '@/utils/request'

//生成订单
export function createOrder(courseId) {
  return request({
    url: '/order/front_order/' + courseId,
    method: 'post'
  })
}

//根据订单号查询订单信息
export function getOrderInfoByNo(orderNo) {
  return request({
    url: `/order/front_order/${orderNo}`,
    method: 'get'
  })
}

//根据订单号，查询订单支付状态
export function getPayStatus(orderNo) {
  return request({
    url: `/order/front_order/pay/${orderNo}`,
    method: 'get'
  })
}

//查询会员所有订单信息
export function getAllOrder(id) {
  return request({
    url: `order/front_order/member/${id}`,
    method: 'get'
  })
}
